<?php
include("../common.inc.php");
InitGP(array("page","action","bid","delids")); //初始化變量全局返回
include("function_common.php");
//初始化對象
include(INC_PATH."/groupbond.class.php");
$gb=new GroupBondClass();

if(empty($action)){
	InitGP(array("gid","sn","uid")); //初始化變量全局返回
	if(!empty($gid))$wherestr[]="gid='{$gid}'";
	if(!empty($sn))$wherestr[]="sn like '%{$sn}%'";
	if(!empty($uid))$wherestr[]="uid={$uid}";
	if(!empty($wherestr)) $wheresql = implode(' AND ', $wherestr);	//條件匯總
	
	//獲取當前頁碼
	$total=$gb->getcount($wheresql); 							  //總信息數
//	$pagesize=15;												  //一頁顯示信息數
//	$page = isset($page) ? max(1, intval($page)) : 1;             //處理頁碼變量
//	$offset=($page-1)*$pagesize;   								  //偏移量
	$dataarray=$gb->getdata("",$wheresql,"gid"); //獲取團購數據
	
	//包含後台模板文件
	include("tpl/groupbond_list2.htm");
}

?>

